package spe.ui.editor.figure;

import org.eclipse.draw2d.IFigure;

import spe.model.spem.MethodPlugin;
import spe.model.spem.RoleDefinition;
import spe.model.spem.TaskDefinition;

public class FigureFactory 
{
	public static IFigure createFigure(Object model)
	{
		IFigure figure = null;
		
		if(model instanceof MethodPlugin)
		{
			figure = new MethodPluginFigure(); 
		}
		else if(model instanceof TaskDefinition)
		{
			figure = new TaskFigure();
		}
		else if(model instanceof RoleDefinition)
		{
			figure = new RoleFigure();
		}
		
		return figure;
	}
}
